﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Pay.Repository.Entities
{
    /// <summary>
    /// 用户银行卡
    /// </summary>
    [Table("pay_mobaoCard"), Comment("支付单"), Index(nameof(UserId))]
    public class MoBaoCard : EfEntity
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Comment("用户ID")]
        public long UserId { get; set; }

        /// <summary>
        /// 摩宝商户
        /// </summary>
        [Comment("摩宝商户"), MaxLength(32)]
        public string? CustNo { get; set; }

        /// <summary>
        /// 客户简称
        /// </summary>
        [Comment("客户简称"), MaxLength(100)]
        public string CustName { get; set; }

        /// <summary>
        /// 客户手机号
        /// </summary>
        [Comment("客户手机号"), MaxLength(32)]
        public string PhoneNo { get; set; }
        /// <summary>
        /// 银行卡号
        /// </summary>
        [Comment("银行卡号"), MaxLength(20)]
        public string CardNo { get; set; }

        /// <summary>
        /// 持卡人姓名
        /// </summary>
        [Comment("持卡人姓名"), MaxLength(100)]
        public string CardName { get; set; }
        /// <summary>
        /// 身份证号码
        /// </summary>
        [Comment("身份证号码"), MaxLength(100)]
        public string IdCard { get; set; }
        /// <summary>
        /// 银行名称
        /// </summary>
        [Comment("银行名称"), MaxLength(100)]
        public string? BankName { get; set; }

        /// <summary>
        /// 银行编号
        /// </summary>
        [Comment("银行编号"), MaxLength(100)]
        public string? BankCode {get;set;}
        /// <summary>
        /// 是否默认
        /// </summary>
        [Comment("是否默认银行卡")]
        public bool IsDefault { get; set; }

        /// <summary>
        /// 卡状态 0:未激活；1：正常；-1：已删除
        /// </summary>
        [Comment("卡状态 0:未激活；1：正常；-1：已删除")]
        public int State { get; set; }  
        /// <summary>
        /// 绑卡时间
        /// </summary>
        [Comment("绑卡时间")]
        public DateTime CreateTime { get; set; }
    }
}
